<?php
namespace app\common\model;

use think\Model;
use think\model\concern\SoftDelete;

class Notice extends Model
{
	use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;
    protected $autoWriteTimestamp = true;

    public static function getNotice($where = 0)
    {
        return self::where($where)->order('sort','DESC')->paginate();
    }
    public static function getIndexNotice()
    {
        return self::where('status',1)->order('update_time','DESC')->select();
    }
    public static function getWin($id)
    {
    	return self::where(['status'=>1,'id'=>$id])->find();
    }
}